package com.healthcloud.service.screening.impl;

import com.healthcloud.dao.screening.ScreeningBsDao;
import com.healthcloud.entity.screening.ScreeningBsEntity;
import com.healthcloud.entity.screening.ScreeningBsVo;
import com.healthcloud.service.screening.ScreeningBsService;
import com.healthcloud.utils.PageParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 血糖筛查
 * @author zhangjie
 */
@Service
public class ScreeningBsServiceImpl implements ScreeningBsService {

    @Autowired
    private ScreeningBsDao screeningBsDao;

    @Override
    public void save(ScreeningBsEntity entity) {
        screeningBsDao.save(entity);
    }

    @Override
    public void update(ScreeningBsEntity entity) {
        screeningBsDao.update(entity);
    }

    @Override
    public ScreeningBsEntity queryByIdCard(String idCard) {
        return screeningBsDao.queryByIdCard(idCard);
    }

    @Override
    public void saveOrUpdate(ScreeningBsEntity entity) {
        if (entity.getId()!=null){
            update(entity);
        }else {
            save(entity);
        }
    }

    @Override
    public List<ScreeningBsVo> queryListVo(ScreeningBsVo entity, PageParam pageParam) {
        return screeningBsDao.queryListVo(entity, pageParam);
    }

    @Override
    public Integer queryTotalVo(ScreeningBsVo entity) {
        return screeningBsDao.queryTotalVo(entity);
    }

    @Override
    public ScreeningBsEntity queryObject(Long id) {
        return screeningBsDao.queryObject(id);
    }

    @Override
    public void deleteBatch(Long[] ids) {
        screeningBsDao.deleteBatch(ids);
    }

    @Override
    public ScreeningBsEntity monthReport(String date, String idCard) {
        return screeningBsDao.monthReport(date, idCard);
    }
}
